CREATE EXTERNAL TABLE `jms_ods`.`tab_barscan_arrival_hi`(
    `recordid` string COMMENT '记录编号'
    , `billcode` string COMMENT '运单编号'
    , `listcode` string COMMENT '清单编号'
    , `subbillcode` string COMMENT '子单号'
    , `transfercode` string COMMENT '转单号'
    , `packagecode` string COMMENT '所属袋号'
    , `scantype` string COMMENT '扫描类型'
    , `nextstation` string COMMENT '上一站或下一站'
    , `destination` string COMMENT '目的地点'
    , `scanuser` string COMMENT '扫描雇员'
    , `inputsite` string COMMENT '录入部门'
    , `scantime` timestamp COMMENT '扫描时间'
    , `inputtime` timestamp COMMENT '录入时间'
    , `operatedate` timestamp COMMENT '操作日期'
    , `send_deliver_user` string COMMENT '派件或收件员'
    , `sendcustomer` string COMMENT '寄件客户'
    , `sendsite` string COMMENT '寄件网点'
    , `destsite` string COMMENT '目的网点'
    , `transfercenter` string COMMENT '中转中心'
    , `pcs` bigint COMMENT '件数'
    , `weight` double COMMENT '重量'
    , `goodstype` string COMMENT '物品类别'
    , `expresstype` string COMMENT '快件类型'
    , `shifts` string COMMENT '班次'
    , `transfer_deliver_fee` double COMMENT '中转或派件费'
    , `networkfee` double COMMENT '网管费'
    , `otherfee` double COMMENT '其他费'
    , `checkflag` string COMMENT '核算标识'
    , `accountflag` bigint COMMENT '对帐标识'
    , `receiptflag` tinyint COMMENT '回单标识'
    , `returnflag` tinyint COMMENT '退件标识'
    , `elescaleflag` string COMMENT '电子秤标识'
    , `unrecordflag` tinyint COMMENT '未录单标识'
    , `writebackflag` bigint COMMENT '回写标识'
    , `lockflag` tinyint COMMENT '锁定标识'
    , `remark` string COMMENT '备注'
    , `modifyuser` string COMMENT '修改人'
    , `modifytime` timestamp COMMENT '修改时间'
    , `mobile` string COMMENT '手机号码'
    , `pistolid` string COMMENT '巴枪ID'
    , `remark1` string COMMENT '备注1'
    , `remark2` string COMMENT '备注2'
    , `scansitecode` string COMMENT '扫描网点编号'
    , `uploadtime` timestamp COMMENT '上传时间'
    , `remark3` string COMMENT '备注3'
    , `scanusercode` string COMMENT '扫��雇员编号'
    , `send_deliver_usercode` string COMMENT '收派员编号'
    , `nextstationcode` string COMMENT '上下一站编号'
    , `source` string COMMENT '来源'
    , `remark5` string COMMENT '备注5'
    , `remark6` double COMMENT '备注6'
    , `remark4` string COMMENT '备注4'
    , `scansiteid` bigint COMMENT '扫描网点ID'
    , `nextstationid` bigint COMMENT '上一站/下一站ID'
    , `scanuserid` bigint COMMENT '扫描雇员ID'
    , `send_deliver_userid` bigint COMMENT '收派员ID')
COMMENT '到件扫描表'
PARTITIONED BY (`dt` string COMMENT '更新日期 (yyyy-MM-dd)')
ROW FORMAT SERDE 'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
WITH SERDEPROPERTIES (
  'serialization.format' = '1'
)
STORED AS
  INPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
  OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION '/dw/hive/jms_ods.db/external/tab_barscan_arrival_hi';